<%- include ('../public/page_header.ejs') %>





  <div class="container-fluid">
    <div class="row">

      <div class="col-sm-10">

        <div class="panel panel-default">
          <div class="panel-heading">
            修改管理员
          </div>
          <div class="panel-body">
            <div class="table-responsive input-form">
              <form action="/<%= config.adminPath %>/manager/doEdit" method="post">
                <ul>
                  <input type="hidden" name="_id" value="<%= adminResult._id %>" />
                  <li> 管理员名称: <input readonly type="text" name="username" value="<%= adminResult.username %>" /></li>
                  <li> 管理员密码: <input type="text" name="password" value="" /></li>
                  <li> 管理员邮箱: <input type="text" name="email" value="<%= adminResult.email %>" /></li>
                  <li> 管理员电话: <input type="text" name="mobile" value="<%= adminResult.mobile %>" /></li>
                  <li> 管理员角色: 
                    <select name="role_id" id="role_id">
                      <% for (var i=0; i<roleResult.length;i++) { %>
                        <% if (roleResult[i]._id.toString() == adminResult.role_id) { %>
                          <option selected value="<%= roleResult[i]._id %>"><%= roleResult[i].title %></option>
                        <% } else { %>
                          <option value="<%= roleResult[i]._id %>"><%= roleResult[i].title %></option>
                        <% } %>
                      <% } %>
                    </select>
                  </li>
  
                  <li>
                    <br />
                    <button type="submit" class="btn btn-default">提交</button>
                  </li>
  
                </ul>
              </form>
            </div>
          </div>


        </div>

      </div>
    </div>
  </div>

  </body>

  </html>